<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\UserWork
 *
 * @property integer $id
 * @property integer $user_id
 * @property string $company
 * @property string $position
 * @property string $start_time
 * @property string $end_time
 * @property integer $status
 * @property string $check_time
 * @property string $deleted_at
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property-read \App\User $toUser
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereUserId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereCompany($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork wherePosition($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereStartTime($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereEndTime($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereStatus($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereCheckTime($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereDeletedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereUpdatedAt($value)
 * @property integer $logo_id
 * @property-read \App\Project $toProjectLogo
 * @method static \Illuminate\Database\Query\Builder|\App\UserWork whereLogoId($value)
 * @property-read \App\Project $projectLogo
 */
class UserWork extends Model {

	//表名
    protected $table = 'user_work' ;
    use SoftDeletes;

    /** 关联用户表 */
    public function toUser()
    {
        return $this->belongsTo('App\User' , 'user_id') ;
    }

    /** 关联项目logoId */
    public function toProjectLogo()
    {
        return $this->belongsTo('App\Images' , 'logo_id');
    }

}
